Scope issue within JavaScript Object literal